home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11464 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  818 b 

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: getopt()
  5. Date: 24 Mar 1996 08:41:54 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4j3u0iINN6ep@keats.ugrad.cs.ubc.ca>
  8. References: <3151FEF2.167E@mashie.ece.jhu.edu>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <3151FEF2.167E@mashie.ece.jhu.edu>,
  12. Chenyang Xu  <chenyang@mashie.ece.jhu.edu> wrote:
  13. >Hi, there,
  14. >
  15. >   What is the role of colon in the string of getopt()? For example,
  16. >
  17. >while ((c = getopt(argc, argv, "f:o:cdDS")) != EOF)
  18. >...
  19. >
  20. >   Thanks for any shedded light!
  21.  
  22. Getopt is not a part of the C language. Read the man page.
  23.  
  24. The colon indicates that the preceding option letter requires an argument, like
  25. -f filename.
  26.  
  27. -- 
  28.  
  29.